package com.whmall.service.crm.module.company.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.whmall.service.crm.module.company.entity.SupplierAccountDO;
import com.whmall.service.crm.module.company.entity.qo.SupplierAccountQO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface SupplierAccountMapper extends BaseMapper<SupplierAccountDO> {

    int insertSelective(SupplierAccountDO record);

    SupplierAccountDO selectById(Long id);

    int updateByIdSelective(SupplierAccountDO record);

    List<SupplierAccountDO> selectSupplierByCompanyId(Long companyId);

    SupplierAccountDO selectDefaultSupplier(@Param("companyId") Long companyId, @Param("defaultAccount") Long defaultAccount);

    List<SupplierAccountDO> selectBy(SupplierAccountQO qo);

    int updateDefaultAccount(@Param("times") Integer times, @Param("list") List<Long> list);
}
